using SymbolIntegration.core.Expressions;

namespace SymbolIntegration.core.Helpers
{
    public static class ExpressionOperatorReloader
    {
        public static Expression Plus(Expression exprLeft, Expression exprRight)
        {
            var addens = AddendsExpression.Add(exprLeft, exprRight);
            return addens;
        }

        public static Expression Minus(Expression exprLeft, Expression exprRight)
        {
            var addens = AddendsExpression.Add(exprLeft, exprRight.SetNegate(true));
            return addens;
        }

        public static Expression Divide(Expression exprLeft, Expression exprRight)
        {
            var multiplier = new DivideExpression(exprLeft, exprRight);
            return multiplier;
        }

        public static Expression Multiple(Expression exprLeft, Expression exprRight)
        {
            var multiplier = MultipliersExpression.Mull(exprLeft, exprRight);
            return multiplier;
        }

        public static Expression Power(Expression baseExpression, Expression powExpression)
        {
            var power = new PowerExpression(baseExpression, powExpression);
            return power;
        }
    }
}